<{include file="top_v2.html" }>
</head>
<body>
<div id="wrap" class="pb">
    <div class="header">
        往期兑换
        <a href="javascript:window.history.back();" class="back"></a>
    </div>
    <div class="container" style="margin-top: 1rem">

    <{if $list}>
    <ul class="goods-list">
        <{include file="PointMall_v2/indexMore.html"}>
    </ul>
    <{else}>

    <{/if}>
    </div>
</div>
</body>
</html>
<script>
    //拖动加载
    var  flagData  =  true;
    var  flagAjax  =  true;
    var  page      =  2;
    var endFlag = $("#endFlag").val();
    //加载
    function  load_more(postData){
        $("#load_more").css({'background':'url("<{$preStaticUrl}>Wap/images/load.gif")  center  center  no-repeat;background-size:30px  30px;'});
        $("#load_more  span").html('正在加载...');
        if(! flagAjax){
            return  false;
        }
        flagAjax  =  false;
        $.post("<{u('PointMall/endMore')}>",postData,function(data){
            if(data.page <= data.totalPage)  {
                $(".wddh_list").append(data.dataHTML);
                $("#load_more  span").html('加载更多');
                page++;
                flagAjax  =  true;
                $("#load_more").css({'background':'url("<{$preStaticUrl}>Wap/images/load.gif")  center  center  no-repeat;background-size:30px  30px;'});
            }  else  {
                flagData  =  false;
                $("#load_container").html('<a  href="javascript:void(0)"  id="load_more">没有更多</a>');
                $("#load_more").css({'background':'url("")'}).css({'padding-top':'0'}).css({'top':'0px'}).css({'position':'relative'});
            }
        },'json');
    }
    var  tmp_scroll  =  0;
    //拖动加载
    $('.xy-panel-content').scroll(function(){
        if  (tmp_scroll  ==  $(this).height()  +  $(this).scrollTop())  {
            return;
        }
        tmp_scroll  =  $(this).height()  +  $(this).scrollTop();
        var  jia_scroll  =  $(this)[0].scrollHeight  -  tmp_scroll;
        if  (jia_scroll  <  100  &&  flagData)  {
            load_more({page:page,pos:"PointMallEndMore"});
        }
    });
</script>